<!--
 * @Author: wuyuxin
 * @Date: 2022-03-19 18:12:42
 * @LastEditors: wuyuxin
 * @LastEditTime: 2022-03-22 11:42:37
 * @Description: 
-->
<template>
  <div class="app">
    <input type="number" step="100" v-model="number"/>
    <h2>当前计数: {{showNumber.toFixed(0)}}</h2>
  </div>
</template>

<script>
  import gsap from 'gsap'
  export default {
    data() {
      return {
        number: 0,
        showNumber: 0,
      }
    },
    watch: {
      number(newVal) {
        gsap.to(this, {duration: 1, showNumber: newVal})
      }
    },
    methods: {
    }
  }
</script>

<style scoped>
  .title {
    display: inline-block;
  }
</style>